from django.test import TestCase
from django.test.client import RequestFactory
from subfactory.views import index

class ViewTest(TestCase):
	def setUp(self):
		# Every test needs access to the request factory.
		self.factory = RequestFactory()
	
	def testIndex(self):
		request = self.factory.get('/subfactory')
		response = index(request)
		content = response.content
		self.assertIn("subfactory",content)
		self.assertEqual(response.status_code, 200)
